home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C & C++ Multimedia Cyber Classroom
/
C and C++ Multimedia Cyber Classroom (Prentice Hall) (1998).iso
/
src
/
fig10_01.jar
/
Ch10
/
Fig10_01
/
Commis1.h
< prev
next >
Wrap
C/C++ Source or Header
|
1997-10-28
|
662b
|
25 lines
// Fig. 10.1: commis1.h
// CommissionWorker class derived from Employee
#ifndef COMMIS1_H
#define COMMIS1_H
#include "employ2.h"
class CommissionWorker : public Employee {
public:
CommissionWorker( const char *, const char *,
double = 0.0, double = 0.0,
int = 0 );
void setSalary( double );
void setCommission( double );
void setQuantity( int );
virtual double earnings() const;
virtual void print() const;
private:
double salary; // base salary per week
double commission; // amount per item sold
int quantity; // total items sold for week
};
#endif